﻿using System;
using System.Collections.Generic;
using System.Text;
using System.BusinessObjects.Data;
using Blazing.BusinessObjects.Cms;

namespace Blazing.BusinessObjects.Widgets
{
    [Serializable]
    public class PageWidget : DataObject<PageWidget>
    {
        public virtual int ID
        {
            get { return GetValue<int>("ID"); }
            set
            {
                BeginEdit();
                SetValue("ID", value);
            }
        }

        public WidgetRegion Region { get; set; }

        public virtual Contentpage Page { get; set; }

        public virtual Widget Widget { get; set; }

        /// <summary>
        /// Specifies parameters to pass into the widget
        /// </summary>
        public virtual string Parameters
        {
            get { return GetValue<string>("Parameters"); }
            set
            {
                BeginEdit();
                SetValue("Parameters", value);
            }
        }

        public virtual DateTime RowStamp
        {
            get { return GetValue<DateTime>("RowStamp"); }
            set
            {
                BeginEdit();
                SetValue("RowStamp", value);
            }
        }
    }
}
